<!doctype html>



  


<html class="theme-next pisces use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.0.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Android,Realm," />





  <link rel="alternate" href="/atom.xml" title="GrantonZhuang's Blog" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.0.1" />






<meta name="description" content="Ｒealm 是一个操作在 native 层，运行效率高过很多运行在 Java 层的 ORM 框架的数据库框架，最近在项目中使用这个框架，初步做了一些封装，最近看了一些别人的作品，也在此影响下形成了自己代码风格的倾向，做个记录，方便以后回忆。">
<meta property="og:type" content="article">
<meta property="og:title" content="Realm初步实践１">
<meta property="og:url" content="https://grantonzhuang.github.io/2016/05/08/Realm初步实践１/index.html">
<meta property="og:site_name" content="GrantonZhuang's Blog">
<meta property="og:description" content="Ｒealm 是一个操作在 native 层，运行效率高过很多运行在 Java 层的 ORM 框架的数据库框架，最近在项目中使用这个框架，初步做了一些封装，最近看了一些别人的作品，也在此影响下形成了自己代码风格的倾向，做个记录，方便以后回忆。">
<meta property="og:updated_time" content="2016-07-29T13:56:02.584Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Realm初步实践１">
<meta name="twitter:description" content="Ｒealm 是一个操作在 native 层，运行效率高过很多运行在 Java 层的 ORM 框架的数据库框架，最近在项目中使用这个框架，初步做了一些封装，最近看了一些别人的作品，也在此影响下形成了自己代码风格的倾向，做个记录，方便以后回忆。">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: 0,
      author: '博主'
    }
  };
</script>




  <link rel="canonical" href="https://grantonzhuang.github.io/2016/05/08/Realm初步实践１/"/>

  <title> Realm初步实践１ | GrantonZhuang's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">GrantonZhuang's Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle"></p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Realm初步实践１
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2016-05-08T20:34:47+08:00" content="2016-05-08">
              2016-05-08
            </time>
          </span>

          

          
            
          

          

          
          

          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Ｒealm 是一个操作在 native 层，运行效率高过很多运行在 Java 层的 ORM 框架的数据库框架，最近在项目中使用这个框架，初步做了一些封装，最近看了一些别人的作品，也在此影响下形成了自己代码风格的倾向，做个记录，方便以后回忆。</p>
<a id="more"></a>
<h2 id="基本操作"><a href="#基本操作" class="headerlink" title="基本操作"></a>基本操作</h2><p>跳过依赖添加等步骤，直接看一个存取操作。摘自官方的 demo</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">private</span> <span class="keyword">void</span> <span class="title">basicCRUD</span><span class="params">(Realm realm)</span> </span>&#123;</div><div class="line">    realm.beginTransaction();</div><div class="line"></div><div class="line">    <span class="comment">// Add a person</span></div><div class="line">    Person person = realm.createObject(Person.class);</div><div class="line">    person.setId(<span class="number">1</span>);</div><div class="line">    person.setName(<span class="string">"Young Person"</span>);</div><div class="line">    person.setAge(<span class="number">14</span>);</div><div class="line"></div><div class="line">    <span class="comment">// When the transaction is committed, all changes a synced to disk.</span></div><div class="line">    realm.commitTransaction();</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="BaseModel-的存在"><a href="#BaseModel-的存在" class="headerlink" title="BaseModel 的存在"></a>BaseModel 的存在</h2><blockquote>
<p>实际使用中，使用 BaseModel 进行多重继承在 Realm ９.0 或者更早版本中行不通，这里删去。但是思想保留，万一哪天支持了呢。</p>
</blockquote>
<p><del> Realm 中要求所有的 Model 继承于 RealmObject, 但是我们不能避免以后会使用别的替代方案，所以一个 BaseModel 的存在是很有必要的，自身工程里的 Model 全都继承自 BaseModel, 只需要让 BaseModel 继承自 RealmObject 即可。 <del></del></del></p>
<h2 id="通用的-Dao"><a href="#通用的-Dao" class="headerlink" title="通用的 Dao"></a>通用的 Dao</h2><p>Dao, Data Access Object, 在 Java 的 web 开发中很常见，但是在 Android 开发上，对于每一个 Model 都写一个 Dao 似乎有点繁琐。</p>
<p>如果在 Model 中封装一些常用的增删改查操作的话，就会对 Realm 产生依赖。但是考虑到解耦的原则，这样做并不好。</p>
<p>因此，通用的 Dao 是有必要存在的，如何体现 Dao 所操作的 Model, 这里我的思路是使用泛型。</p>
<p>以下这个类是根据泛型指定的类型来体现操作的是哪一个 Model， 目前封装了几个基础的操作，当然还很不完善。</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">Dao</span>&lt;<span class="title">T</span> <span class="keyword">extends</span> <span class="title">RealmObject</span>&gt; </span>&#123;</div><div class="line"></div><div class="line">    <span class="keyword">private</span> Class&lt;T&gt; clazz;</div><div class="line"></div><div class="line">    <span class="keyword">private</span> Realm realm;</div><div class="line"></div><div class="line">    <span class="function"><span class="keyword">public</span> Realm <span class="title">getRealm</span><span class="params">()</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> realm;</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// 构造函数指定 对应的 Model 和相应的 配置</span></div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="title">Dao</span><span class="params">(Class&lt;T&gt; tClass, RealmConfiguration configuration)</span> </span>&#123;</div><div class="line">        <span class="keyword">this</span>.clazz = tClass;</div><div class="line">        <span class="keyword">if</span> (configuration == <span class="keyword">null</span>) &#123;</div><div class="line">            <span class="keyword">this</span>.realm = Realm.getDefaultInstance();</div><div class="line">        &#125; <span class="keyword">else</span> &#123;</div><div class="line">            <span class="keyword">this</span>.realm = Realm.getInstance(configuration);</div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// query</span></div><div class="line">    <span class="function"><span class="keyword">public</span> T <span class="title">get</span><span class="params">(<span class="keyword">long</span> id)</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> realm.where(clazz).equalTo(<span class="string">"realmId"</span>, id).findFirst();</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// query</span></div><div class="line">    <span class="function"><span class="keyword">public</span> T <span class="title">get</span><span class="params">(String key, <span class="keyword">long</span> id)</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> realm.where(clazz).equalTo(key, id).findFirst();</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// insert</span></div><div class="line">    <span class="function"><span class="keyword">public</span> T <span class="title">create</span><span class="params">()</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> realm.createObject(clazz);</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="function"><span class="keyword">public</span> T <span class="title">copy</span><span class="params">(T t)</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> realm.copyToRealm(t);</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// write</span></div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">basicWriteOpt</span><span class="params">(WriterOpt writerOpt)</span> </span>&#123;</div><div class="line">        realm.beginTransaction();</div><div class="line">        writerOpt.rewrite();</div><div class="line">        realm.commitTransaction();</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">saveDataFromJSONStream</span><span class="params">(<span class="keyword">final</span> InputStream inputStream)</span> <span class="keyword">throws</span> IOException </span>&#123;</div><div class="line">        realm.beginTransaction();</div><div class="line">        <span class="keyword">try</span> &#123;</div><div class="line">            realm.createAllFromJson(clazz, inputStream);</div><div class="line">            realm.commitTransaction();</div><div class="line">        &#125; <span class="keyword">catch</span> (IOException e) &#123;</div><div class="line">            realm.cancelTransaction();</div><div class="line">        &#125; <span class="keyword">finally</span> &#123;</div><div class="line">            <span class="keyword">if</span> (inputStream != <span class="keyword">null</span>) &#123;</div><div class="line">                inputStream.close();</div><div class="line">            &#125;</div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">abstract</span> <span class="class"><span class="keyword">class</span> <span class="title">WriterOpt</span> </span>&#123;</div><div class="line"></div><div class="line">        <span class="function"><span class="keyword">public</span> <span class="keyword">abstract</span> <span class="keyword">void</span> <span class="title">rewrite</span><span class="params">()</span></span>;</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="单实例的-Dao"><a href="#单实例的-Dao" class="headerlink" title="单实例的 Dao"></a>单实例的 Dao</h2><p>考虑到 Dao 在工程中应该单例的存在，所以改进的思路是将 Dao 的构造函数改为私有，并且使用一个内部类 Provider, 来提供 Dao 实例</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">public</span> <span class="keyword">static</span> <span class="class"><span class="keyword">class</span> <span class="title">Provider</span> </span>&#123;</div><div class="line"></div><div class="line">    <span class="keyword">private</span> <span class="keyword">static</span> HashMap&lt;String, Dao&gt; daos = <span class="keyword">new</span> HashMap&lt;&gt;();</div><div class="line"></div><div class="line">    <span class="meta">@SuppressWarnings</span>(<span class="string">"unchecked"</span>)</div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> Dao <span class="title">load</span><span class="params">(Class&lt;? extends RealmObject&gt; tClass, RealmConfiguration realmConfiguration)</span> </span>&#123;</div><div class="line">        <span class="keyword">synchronized</span> (Provider.class) &#123;</div><div class="line">            Dao dao = daos.get(tClass.getSimpleName());</div><div class="line">            <span class="keyword">if</span> (dao == <span class="keyword">null</span>) &#123;</div><div class="line">                dao = <span class="keyword">new</span> Dao(tClass, realmConfiguration);</div><div class="line">                daos.put(tClass.getSimpleName(), dao);</div><div class="line">            &#125;</div><div class="line">            <span class="keyword">return</span> dao;</div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> Dao <span class="title">load</span><span class="params">(Class&lt;? extends RealmObject&gt; tClass)</span> </span>&#123;</div><div class="line">        <span class="keyword">return</span> load(tClass, <span class="keyword">null</span>);</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="修改后的实例"><a href="#修改后的实例" class="headerlink" title="修改后的实例"></a>修改后的实例</h2><p>以上的操作可以改写为如下代码，不出现 Realm 框架的东西，相对清晰了一些。</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">final</span> Dao&lt;Person&gt; dao = Dao.Provider.load(Person.class);</div><div class="line">dao.basicWriteOpt(<span class="keyword">new</span> Dao.WriterOpt() &#123;</div><div class="line">    <span class="meta">@Override</span></div><div class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">rewrite</span><span class="params">()</span> </span>&#123;</div><div class="line">        Person person = dao.create();</div><div class="line">        person.setId(<span class="number">1</span>);</div><div class="line">        person.setName(<span class="string">"Young Person"</span>);</div><div class="line">        person.setAge(<span class="number">14</span>);</div><div class="line">    &#125;</div><div class="line">&#125;);</div></pre></td></tr></table></figure>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Android/" rel="tag">#Android</a>
          
            <a href="/tags/Realm/" rel="tag">#Realm</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/05/01/注解框架RoBoGuice和ButterKnife的对比/" rel="next" title="注解框架RoBoGuice和ButterKnife的对比">
                <i class="fa fa-chevron-left"></i> 注解框架RoBoGuice和ButterKnife的对比
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/05/14/Realm初步实践 2 /" rel="prev" title="Realm初步实践２">
                Realm初步实践２ <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://ww1.sinaimg.cn/mw690/6e8939a6gw1f3g1u1mc6lj20hs0hsmxf.jpg"
               alt="Granton Zhuang" />
          <p class="site-author-name" itemprop="name">Granton Zhuang</p>
          <p class="site-description motion-element" itemprop="description"></p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives/index.html">
              <span class="site-state-item-count">26</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">11</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#基本操作"><span class="nav-number">1.</span> <span class="nav-text">基本操作</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#BaseModel-的存在"><span class="nav-number">2.</span> <span class="nav-text">BaseModel 的存在</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#通用的-Dao"><span class="nav-number">3.</span> <span class="nav-text">通用的 Dao</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#单实例的-Dao"><span class="nav-number">4.</span> <span class="nav-text">单实例的 Dao</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#修改后的实例"><span class="nav-number">5.</span> <span class="nav-text">修改后的实例</span></a></li></ol></div>
            
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Granton Zhuang</span>
</div>

<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>

        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/vendors/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.0.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.0.1"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.0.1"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.0.1"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.0.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.0.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.1"></script>



  



  




  
  

  

  

  

</body>
</html>
